import { ref, computed } from 'vue';
import { defineStore } from 'pinia';

export const useNavStore = defineStore('nav', () => {
  const listData = ref([
    {
      name: '小车',
      url: 'xiaoche',
      active: 0,
      children: [
        {
          id: 110528,
          name: '小车科目一（交规）',
          active: 0
        }, {
          id: 110529,
          name: '小车科目四（安全文明驾驶）',
          active: 1
        }
      ]
    }, {
      name: '货车',
      url: 'huoche',
      active: 1,
      children: [
        {
          id: 110526,
          name: '货车科目一（交规）',
          active: 0
        }, {
          id: 110527,
          name: '货车科目四（安全文明驾驶）',
          active: 1
        }
      ]
    }, {
      name: '客车',
      url: 'keche',
      active: 2,
      children: [
        {
          id: 110524,
          name: '客车科目一（交规）',
          active: 0
        }, {
          id: 110525,
          name: '客车科目四（安全文明驾驶）',
          active: 1
        }
      ]
    }, {
      name: '摩托',
      url: 'motuo',
      active: 3,
      children: [
        {
          id: 110531,
          name: '摩托车科目一（交规）',
          active: 0
        }, {
          id: 110532,
          name: '摩托车科目四（安全文明驾驶）',
          active: 1
        }
      ]
    }, {
      name: '资格证',
      url: 'zigezheng',
      active: 4,
      children: [
        {
          id: 110517,
          name: '道路旅客运输资格证',
          active: 0
        }, {
          id: 110519,
          name: '危险货物运输基础知识',
          active: 1
        }, {
          id: 110545,
          name: '危险货物驾驶员专业知识',
          active: 2
        }, {
          id: 110547,
          name: '危险货物装卸员专业知识',
          active: 3
        }, {
          id: 110548,
          name: '危险货物押运员专业知识',
          active: 4
        }, {
          id: 110521,
          name: '出租车公共题库',
          active: 5
        }, {
          id: 110546,
          name: '巡游出租车区域题库',
          active: 6
        }, {
          id: 110523,
          name: '网约出租车区域题库',
          active: 7
        }
      ]
    }, {
      name: '特种作业',
      url: 'tezhongzuoye',
      active: 5,
      children: [
        {
          id: 110357,
          name: '高压电工作业',
          active: 0
        }, {
          id: 110358,
          name: '低压电工作业',
          active: 1
        }, {
          id: 110411,
          name: '高处安装维护拆除作业',
          active: 2
        }, {
          id: 110410,
          name: '登高架设作业',
          active: 3
        }, {
          id: 110354,
          name: '熔化焊接与热切割作业',
          active: 4
        }
      ]
    }
  ])

  return { listData }
})